package com.cskaoyan.controller.indexController;

import com.cskaoyan.model.vo.extend.BaseRespVo;
import com.cskaoyan.model.vo.index.WXCatalogVo;
import com.cskaoyan.service.CatalogService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author：Chunk
 * @Description:
 * @Date Created in 19:23 2021/4/13
 */
@RestController
@RequestMapping("/wx/catalog")
public class WXCatalogController {

    @Autowired
    CatalogService catalogService;

    @RequestMapping("index")
    public BaseRespVo catalogIndex(){
        WXCatalogVo wxCatalogVo = catalogService.catalogIndex();
        return BaseRespVo.ok(wxCatalogVo);
    }
    @RequestMapping("current")
    public BaseRespVo catalogCurrent(Integer id){
        WXCatalogVo wxCatalogVo = catalogService.currentCategory(id);
        return BaseRespVo.ok(wxCatalogVo);
    }
}
